package jp.java.test1.pkg20_29.test25;

public class Main {

	public static void main(String[] args) {
		Factory factory = new Factory();
		Module module = factory.create();
		module.hello();
	}

}
interface Module {
	void hello();
}

class Factory {
	public Module create() {
		class Inner implements Module {

			@Override
			public void hello() {
				System.out.println("hello");
			}
		
		}
		Inner inner = new Inner();
		return inner;
	}
}